<!--
  Generated template for the SerspinPage page.

  See http://ionicframework.com/docs/components/#navigation for more info on
  Ionic pages and navigation.
-->
<ion-header>

  <ion-navbar>
    <ion-title>入库单查询</ion-title>
  </ion-navbar>

</ion-header>

<ion-content>
  <!-- 下拉刷新块 -->
  <ion-refresher (ionRefresh)="doRefresh($event)">
    <ion-refresher-content>
    </ion-refresher-content>
  </ion-refresher>
  <!--搜索框-->
  <ion-searchbar [(ngModel)]="searchValue" (ionInput)="getItems($event)" placeholder="搜索单据"></ion-searchbar>
  <ion-list>
    <ion-item *ngFor="let item of items" (tap)="showDetail(item)">
      <h2>入库单号：{{item.sp_in__in_code}}</h2>
      <p>仓库：{{item.sp_in__house_name}}</p>
      <p>业务员：{{item.sp_in__house_user}}</p>
      <span [ngSwitch]="item.sp_in__auditing_in" item-end>
        <ion-badge color="secondary" *ngSwitchCase="1">已提交</ion-badge>
        <ion-badge color="secondary" *ngSwitchCase="2">审批中</ion-badge>
      </span>
      <!--<ion-badge item-end>{{item.sp_in__auditing_in}}</ion-badge>-->

      <!-- <button ion-button clear item-end>查看</button> -->
    </ion-item>
  </ion-list>

  <!-- 上拉加载块 -->
  <ion-infinite-scroll (ionInfinite)="doInfinite($event)" immediate-check="false">
    <ion-infinite-scroll-content></ion-infinite-scroll-content>
  </ion-infinite-scroll>
</ion-content>
